<template>
      <div class="block mt10 tc mb10">
        <el-pagination
            @current-change="handleChange"
            :current-page.sync="newPage"
            :page-size="pageSize"
            layout="total, prev, pager, next,jumper"
            :total="total">
    </el-pagination>
        <br>
      </div>
</template>

<script>
    export default {
        data(){
            return {
                newPage:1
            }
        },
        props:{
            page:{
                type:Number,
                default:1
            },
            pageSize:{
                type:Number,
                default:15
            },
            total:{
                type:Number,
                default:0
            }
        },
     watch:{
         page:{
             handler(newP){
                // console.log(old,ne)
                this.newPage=newP
             }
         }
     },
        methods:{
           handleChange(page){
               //console.log(page,'---');
               this.$emit('pageFun',page);
           }
        }
    }
</script>

<style scoped>

</style>
